package com.ming.luckyDemo;

import com.ming.luckyDemo.config.HttpClientUtil;
import com.ming.luckyDemo.util.DateUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author Tcm
 */
@SpringBootApplication
public class LuckyDemoApplication {

	public static void main(String[] args) throws InterruptedException {
		SpringApplication.run(LuckyDemoApplication.class, args);
		HttpClientUtil httpClientUtil = new HttpClientUtil();
		for (int i = 0; i < 150000; i++) {

			DateUtil dateUtil = new DateUtil();
//			if (dateUtil.getSecond()==50){
//			}
			/**
			 定时每分钟调用一次接口，更新最新期数的数字
			 */
			httpClientUtil.aa(dateUtil.getNumbers());
			Thread.sleep(1000*60);
		}
	}

}
